algorithms I implented