code

Keep the behavior unchanged but refactor the code: