add json generator in index, and made the pie element confess to its nature