remove while loop in class GA