added ref to thmap, which this will use