replaced inner classes