simple forloop engine