updated with working updates and delete functions