bottomup modified