function for adding lines to route
function for adding lines to route