change getFirst to getLast on index