4th Algorithm added