added borders
added handlers for socket events