remove http call from individual functions