removed max.n option will think about it later.