Now generating numbers correctly