refactor with new endpoint names