almost. printing has a bug