added run method for programs