output result when pop and peek