Added number generation with functions