addressed CR feedback, added support for indexed access