curl function added