add missing spaces

minor refactoring to keep code consistent