using Q promise
Merge pull request #6 from KrakeIO/atomic

using Q promise