formatting for API