may be worth abstracting this away into a decorator