reduce some boilerplate code