cleaned up counter a bit