mistake in recursive call