added 'press' and some global vars at the bottom