changed render to redirect