changed inView.js: style of code is improved