Added all the button functionaly and mouse funtcionality