refactoring class. split in two class.