You don't need the class pattern here. Just refactor the function to accept an object as a parameter