fixed number printing, added tests