use optimized getitem