rearrange some function and option