refactored prune
refactored redundant?