cleaned up add.js