changed printf --> cout