make more functional
push the string matching into the external function
read the resolution setting from the file