redirection works but in a hacky way