added documentation & improved tests for pruning