cancel and apply button now working as well