understanding behavioural loops