refactoring l2, remove functions from erlog_logic