correcting endpont