update double square bracket func