Make it work with multiple elements.