getSmallestNumber function is working correctly