code refactor, no logic change