more refactoring :)