updated to reverse endpoint