fix replace bug and add input params