made data json, changed index to php