use a class so we don't have to pass so many parameters around