change structure of some function