cky algorithm initial implementation