updated model, included scripts in index.html