modify n to dict and add some newline