refactoring Represent into a class.