better class structure