main view redirect and other stuff