implement some methods for Number class