removed unchagedCount function