Altered While and Do While classes