adding in dynamic counter