2's complement hack fully tested and working