scan logic moved to a single method
remove prefs dependency from states