finally compiles, but crashes immediately