Optimizing Api Calls