[improvement] Added support for cycles