reworked replacement class