udpated app.js for farmatid