     typedef nvbio::vector_view<pattern_iterator>                                                pattern_string;
 
     typedef nvbio::PackedStringLoader<base_iterator,
-        io::FMIndexData::GENOME_BITS,
-        io::FMIndexData::GENOME_BIG_ENDIAN,uncached_tag_type>                                   text_loader_type;
+        REF_BITS,
+        REF_BIG_ENDIAN,uncached_tag_type>                                                       text_loader_type;
     typedef typename text_loader_type::iterator                                                 text_iterator;
     typedef nvbio::vector_view<text_iterator>                                                   text_string;
 

    typedef nvbio::vector_view<pattern_iterator>                                                pattern_string;

    typedef nvbio::PackedStringLoader<base_iterator,
        io::FMIndexData::GENOME_BITS,
        io::FMIndexData::GENOME_BIG_ENDIAN,uncached_tag_type>                                   text_loader_type;
    typedef typename text_loader_type::iterator                                                 text_iterator;
    typedef nvbio::vector_view<text_iterator>                                                   text_string;


    }
    log_visible(stderr, "reading reference file \"%s\"... done (%u bps)\n", ref_name, ref_length);

    typedef PackedStream<uint32*,uint8,REF_BITS,REF_BIG_ENDIAN> ref_stream_type;

    thrust::device_vector<uint32> d_ref_storage( h_ref_storage );
    ref_stream_type d_ref_stream( nvbio::raw_pointer( d_ref_storage ) );
