remove redirect function