implemented rete for facts