Move some calculation from indev to v6