add transfer method
move js to app.js
simplify server.js