Adding code to onClick method