corrected for sequences template