minimal rewrite compiles
first test passing!