Updated to work with main generator