APi and FIles homework

this was reall challenging, thanks.