implemented cky