How to use the control function