fix diff output (was totally borked) + documentation