At last! first full derivation, hope there are no errors...