view functionality working