a more elegant solution and more validation for update