Added mapRoute function