improved the serial reader code
improved serial data reader code
added comments to serial reader