fix endpoints and sending