replace and with then