revising flow for better redirect