import and adopt pstreams