added websockets and associated changes in model