added end of line and made `settings` a local variable.