made a mistake in which err to check