corrected some more mistakes, corrected non-standard indexes names, looks like it works