remove target checking, use length to check if list is not empty