while loop and if stmt added