simplify factory
fix spaces + refactoring