Final commit, added the logic function to be counted in  count_ops()