crack at some simplification