1. add series size parameter for more flexibility; 2. add upper and lower parameters for generating uniform distribution