minor change on loop count