added ARRAY FUNCTION - Finds the smallest value just need check against given number