n must be positive