rewriting patterns as a map, and calling the new module 'routing'