add json endpoints for each data type and make queries faster