adding functionality to update counts