adding view functionality