added ability to deal with paired ends