Implemented knows generation. Need to fix bugs