included app.use(bodyParser.json()); to allow ajax post method