Removing a duplicate method in stream