rearrange some directives