little bit refactor