switching over from stream api