added nested api calls so we can pass one parameter to the other