Removing tuple syntax and replace with pattern match