added code for sending data to the pic