a big modify:the implementation is wrong