refactored to use service module to extract json