added reg allocation stuff