populate view class properly