first working implementation of DFIX, DANG

todo:
cleanup and structure code!