there's one iif left that can be replaced by quick math :p
Honestly. Took me quite some minutes to come up with
_________________________