working api call and rendering on the screen