Add cycle logic