get the bug
Code refactoring and fix toPoint(helper.js)