using curl to debug