Adding most recent changes involving the four different algorithms