major refactoring - breaking into sub classes
refactorig test for consistency