Implementation of Algorithms