how to make a program for event