automatically determine program name