organizing endpoint code lines