Update custom matcher to handle multiple elements