finished, version with comments
todo: derivation, everything else finished