cfg now works after all changes