added bean counting example