Wrote select and delete statements, fixed update