added serial functionality