add .resolve
check if pending state
while there are promises fulfill them with a value or reject