added prune option