refactoring point class while writing laserScanner