How to use the program function