moved some printing around