Praveena's pattern matching solution