renamed things and make base class