reverting some of that code and fixing compiler pass