replace method array