add View class instance and use constracter