add views sample code