reorganized so endpoints are more logical