compiles, but with problems