replace logic