add curl helper funtion