added a member function to the struct