added a redirect option in the plugin