a better if statement to delete and if exists funx