compiles on linux. tests pass.