made async, added cleanup call