make it work for curl