add loop analysis