Make request functions asynchronous by adding callback parameter to them