improve @mcdong's commit