Start using pat library for pattern matching