refactor code, change chopPoint to vaiable