working on mem2reg