added monitor.js and db save