Code done together by Rob and Dan, initial version for first button