Use as-patterns to improve readability