modularized some methods, added listener counts