this version now kind of works in ModelSim