Refactoring + test_print added