rearrange order of action processing