added regalloc to main