fixed bugs
copy and modify for use of allele alphabet