refactoring :P