broken code but shows the direction the API is taking and why it s taking so long