How to create a running program for different purposes