fixed async calls & added tests