solve the local-stmt-local-stmt problem