added view generator functionaliy