replaced node-promise with q