Analysis of the process of retention of organic matter in stream ecosystems