It looks like these 3 options could be summarized thanks to a helper function.