Everything seems to work. Getting rid of pruning loop