This was harder than I thought to simplify!