updating roll count function