Loops refined, introducing state