fixing browser test
Implementing asynchronous call style. Fixes #4