rewrite the plugin for guzzle 4