done for both buttons