also make it possible to specify the redirect method