add support for loops