created function and r documentation for joinreads