Add code for serial server