fixed callback issue
converted to express.js