example with viewmodel