started rewrite, needs inventory and WE apis