added count fingers code