counting instructions, adding algo namespace