psuedocode index update