remove curl system calls and use LWP::simple