Updated to use settings