client server base code