Added return result format test via regexp, sample from full integer range
Slight code refactor for readability