implement delete button. fix bug where updating a newly created model would only send post requests