Changing function that is called when clicked