make side effect free