worked on View constructor