set refs index to be undef if population not needed