adding instructions to identify loops and values read from memory