Added WaitButton subroutine