optimized API calls to reduce 500s