modified createViews method