rewrite settings controller