app.js

update to function