improved main view controller