preparing for update and create function