moves endpoints to const