fixed stupid mistake in problem 1