replaced node-promise with q
updated