code is class based