change redirect option to be true/false, and default true