replace some code