updated text object from stdclass to amstring