add compareNumbers method.