implement view-model class