added cycle parsing; fmt code