refactoring cky
added the ability to make logs optional