updated view.js