cleaned up code, introduced one-shot on button press
moved button read to seperate function