Added prune learning and connected all