now replace index