Added removed printf/cout statements for proper output