change private to protected for all params and functions and change count behavior