add promise to #register, #unregister
Merge pull request #4 from inexplicable/master

add promise to #register, #unregister