adjusted to promise update