clean code and fix serial send