refactor Pattern static methods into Util module
reverse lineages