changed way view is created