updated endpoint handing