crude version that actually works