final code upload.

changed the way the button press is captured