update program to use refactored WaitUntilPress() method