added missing socket and httplib import