moved a method to streampairextensions