adjust curl function