Basic promisified implementation.