first working instance of not having to call the API every time