preparing for update function