added index function to generate json response for Android client