started to implement server thread