updated to use variables from apigee class