fixing controller's file for redirect, but currently having issues