Added code to make the serial connection work