code for routing

making progress for routing and mongodb query