changed to only looking at edgevar instead of in and out