change flatMap to concatMap