added offsetGet logic