some little bit of refactoring