new version which actually works with button presses.