added tracking of number of operations