Added code for counter´