rearrange fn call