add move_max and move_nanmax