reformat endpoints