allow create loops in functions