Added advanced loop example