calculating the next primitive is added