removed redirect function