Refactored to new promise signature