put boilerplate into a function