added check for programs that can be opened.