tilecost.js done and working