made changes to redirect in controller