replace method only takes three args now