main updated add counter