added reg alloc stuff