take inner classes into accounts