cleanup and flops counter added