add smooth algorithm, need more analyze