changed structure of the class