added promise resolution .then check