rewrote config code to deal with yaml configuration