decrease counter further
some refactoring
rearrange