added control to buttons