add serial and master/slave implementation