Number range checking added.