7th version of code snippet.This checks settings