added path variable, added redirect method