implementation of class algos