change function name redirectAlert to redirectWithAlert