added settings. fixed strange syntax issues