small refactoring around spaces