Data and streaming code added. will need modification to work properly.