added debug info to TAC output
padded 3AC and fixed some bugs