choose prim types by signature distance