added actions to buttons