Can anyone help me to transform that code?