small refactor (No logic was changed)