dirty commit of somehow working version. we get bad results in cgminer, but data exchange in prints is looking ok