code clean and add max_depth method