updated .view code