looping now working with button press