bad codes....(I even don't believe it is written by me)