fix number generator method