Adding loop support