alittle refactoring