Added cyril's algorithm for complete space