parsefasta's while loop can be simpler.