changed code position of check if tape is full when adding actions