view chenged to Class Based. tests writen. minor chenges made