add unit testing and enable stream download