added string_pad, upsampleDD, reorganize AI codes