use promises for swapping
oops
Merge pull request #7 from ymmn/promises-refactor

Promises refactor