"apply button" works but only for "delete" function