Replace with their solution (working)

This one actually works...