creating a class based system