The sole aim of this PR is to enhance these 'for' loops in order to reduce gas costs..
This can be used as a reference
Thanks!
@WhiteOakKong @nkrishang