server refactoring (update and creation new entities)