more tests and fixed printing