completed APIConnection; now it works
removed print statements