first part of routing