Added settings object argument to K