added settings functionality; categories are optional if chosen from the settings