finally a nice class structure