fixing bugs
got rid of duplicates