Almost done, compilable code