writing route start/end point check