changed names of the functions, plus added endpoints to set_up_endpoint