added a validation function
same line stops calculated and display
handle bi-directional travel on a single line