fixed compiling errors, gave up on everything else