working example of creating view