add serial_check function