made class based code