odoepner's reusable code