A litle more refactoring