add assertion for staying inside the locus
rework iteration over sequence (should fix #11)
Merge branch 'fix_issue_11'