Adding the feature of counting moves