added eventemitter and socket