basic client-server working code