added support for detecting double-counting