this was much more tedious to define than I would have guessed!