Add base funtion to  view class