added functionality to restrict the use to just one endpoint