modify the terrible code