[IMP] Code rewriting