Functionized the stream resolver