started on the function deletion logic