functions moved to classes to seperate files