get compounds for pathway
pathway by reference