Hi how you ensure the updated node community while calculating the gain value as on its first iteration it should not be available?