DEV: switch to use egen instead of dsi