consolidate to api