creating a view class