added asynchronous support