will rewrite cfg in spare time