fixed the output format so that It can be imported by R