first pass at porting trait_number.t