Made script running asynchronous