Changed number picking such that a new chosen number is as small as possible
API update