fix getSequences and add test