changed delete method. Need to test this for functionality