improve code
checking size of array is unnecesary when for each follows
use api_url as class variable
unused import