re-use pattern when possible Contributed by Benoit Wiart (b.wiart at ubik-ingenierie.com) Part of PR #217 on github.