Switch implementation to pattern match.