reimplemented starli0n's changes for st2
opendiff example