Alex's refactoring 2