class based part 1