Changed output fromat and any refactoring
Added good output format