converting everything to classes