switched to async model
async interface for supporting very large trees, fixes #4