Reduce boilerplate code for prisms