added a reference to the struct which means I can now pass everything to
class member functions