removed one superfluous if condition