script more refined
api fetch corrected