minor refactoring
adjusted tests to fit minor refacroring.