corrected the .update() method overwriting existing entity issue