moved socket connection code to seperate file and create empty grid