implements delete functionality as linked with GUI