updated imports to satisfay both dag and q