compiles, still missing pieces