almost printing in stdout