correct the up function, and relevant test case.