add checking before being able to delete