Changed custom max number to use numeric_limits<int>::max() to get a max num an int can hold