fixed bugs, got update, delete to work