started writing the algorithm for lazy cc