implemented CYK, need to implement to_json