refactored formula update from db.Entity