change config to js