modified gridformat.js