New updated code from rain.