Finally got a working viewmodel