constructor for View class