added for loops and moved readonly flag to ASTnode struct