replacing main