Added cout statement to output result