formatting and updating to use settings class