add instances for either, maybe, and tuple, and some helper functions