A little bit refactoring