made trace listener portable (no magic numbers)