added onclick function for button