moving code to classes/