class implementation
sorted numbers