add views function