Function to work with paired reads