implement update to share code with insert