remove connect event and replace with on()