added rules for counting