made key validation asynchronous