add ability to get current endpoint