some improvements

- fake now returns promise
- added jasmine test cases
- minor bug fixed