use AnyEvent instead of Curl