removed some logging; "refined" hack copied from SnapOGram