Added basic support for loops