added deleting functionality.