codebehind to mvvm (lots of errors)