Changed BreadthRequirement class to a function