Compilable version of old code