this is the main server program