added some algorithms