move server class to separate file
add a function to handle the connection
add a simple loop to echo input