here's a version that actually compiles