working final code to main directory under "app.js" & new working code for HMC6352