redirect method improved