added asynchronous functionality