Refactored to not be async