adding the use of ViewModel on templates