add the test case
rewrite movetoFront method and haskey