working delete
working update
add comments
improve code