Full algo