changes indexes calculations