added new function to read bdm output