- fix bug start from 1 to n-1