added an example of using Q promise library
All unit function are currently passing