added logging, sped up active users fn