Add compareNum and related methods