tidied up code and corrected baud rate.