modified shape.js