changed index from php