added the select route functioanality