refactored a new class for second pass