refactored code in SalesForceRestAPI class