bug fixed. it's due to the wrong way to achieve array assignment