routing improved version