finish the update and delete functionality later
add more logic and debug later
complete later