fork of google singleton detector with some different output possibilities