added code for bwa