use sm instead of smallest_abs