modified model.js and shell.js