added test method for printf