close to original printf