Button read updated

Now the program does not stall when button is pressed