updated DS with Counting