Add functions to generate numbers and sort them