prints, but invert is wrong; also, print not clean