change deletion capability to sync function
minor code cleanup