add option to set max listeners