beta reduction now depth-first