Changed from cout to printf