Implemented stream based approach