changed indexes to be handled equally