add loop detection