big refactor, using json config file now