doesn't work but it compiles

everything is more or less there. No idea where the bugs are.