improvements in events and socket added