updated tests with proper count and accounting
Added in old code, comments