added count threshold checker