Adding serial reading code