add PUT handler to insert new values or update existing values