Added getThingId function and type