some more clean up and testing
   -Bugs
     using some  existing variables nodes causes segment fault but not all.
     whenever cog-bc is called for the second time the result is empty list but was supposed to be same as the first.