converted first api method to use PrecogHttp