added buttonfunctionality