adding fuction to button