added light script to execute prog in command line, some refactoring as well