added debug serial functions