complete the route parsing&&inserting function