done the c button logic