fixed addPoint method