adds checking and deleting capabilities