Working example. Still not clean, tho.