using register machine now (primitives are still missing)