num check factory refaktor