change data in MacNode structure as array, and manipulating function accordingly. Add some log points