Added promise support.