added support for subscripts with []