optimizing serialcom