linking gui and logic over button action