added some elementary algorithms