started pruning algorithm
done
last minute changes