fix an error, improve the output