use correct endpoints