base class for view controller