Littel bit of refactoring