updated view code