refactoring, remove unnecessary objects, simplify things,  make tests green