If those patterns are repeated several time, it would be nice to make some code refactoring. But this would be the topic of another pr.