added in close/delete functionality