got the output from the serial data to work properly