evalIndexExpression auxiliary function added