change string[] to DTRow for input, fixed bugs