more work on the polygon.js...